package com.xawl.service.impl;

import com.xawl.dao.NavMapper;
import com.xawl.pojo.PopularNav;
import com.xawl.service.NavService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class NavServiceImpl implements NavService {

    @Autowired
    NavMapper navMapper;

    public Integer getTotal() {
        return navMapper.getTotal();
    }

    public int addNav(PopularNav popularNav) {
        return navMapper.addNav(popularNav);
    }

    public int deleteNav(int u_id) {
        return navMapper.deleteNav(u_id);
    }

    @Override
    public int deleteNavs(Long[] ids) {
        return navMapper.deleteNavs(ids);
    }

    public int updateNav(PopularNav popularNav) {
        return navMapper.updateNav(popularNav);
    }

    @Override
    public List<PopularNav> queryAll() {
        return navMapper.queryAll();
    }

    @Override
    public PopularNav findNavById(int id) {
        return navMapper.findNavById(id);
    }
}
